package tmp;
import org.eclipse.swt.SWT;
import org.eclipse.swt.browser.Browser;
import org.eclipse.swt.browser.StatusTextEvent;
import org.eclipse.swt.browser.StatusTextListener;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
import org.eclipse.swt.widgets.ToolBar;
import org.eclipse.swt.widgets.ToolItem;

public class ShowResults {
	public void open(String url) {
		Display display = new Display();
		final Shell shell = new Shell(display);
		shell.setText("Browser Example");
		shell.setSize(600, 400);

		ToolBar toolbar = new ToolBar(shell, SWT.NONE);
		toolbar.setBounds(5, 5, 200, 30);

		final Browser browser = new Browser(shell, SWT.NONE);
		browser.setBounds(0, 0, 600, 400);

	
		shell.open();
		browser.setUrl(url);
		while (!shell.isDisposed()) {
			if (!display.readAndDispatch())
				display.sleep();
		}
		display.dispose();
	}
}